import 'dart:io';

import 'package:flutter/material.dart';
import 'package:json_annotation/json_annotation.dart';
import 'package:kayo_package/kayo_package.dart';

///  smart_lock_flutter
///  bean.common
///
///  Created by kayoxu on 2019-09-05 14:44.
///  Copyright © 2019 kayoxu. All rights reserved.

class BleDevice {
  BleDevice({this.name, this.mac, this.bound});

  String? name;
  String? mac;
  int? bound;

  factory BleDevice.fromJson(Map<String, dynamic> json) =>
      _$BleDeviceFromJson(json);

  Map<String, dynamic> toJson() => _$BleDeviceToJson(this);
}

BleDevice _$BleDeviceFromJson(Map<String, dynamic> json) {
  return BleDevice(
    name: json['name'] as String?,
    mac: json['mac'] as String?,
    bound: json['bound'] as int?,
  );
}

Map<String, dynamic> _$BleDeviceToJson(BleDevice instance) => <String, dynamic>{
      'name': instance.name,
      'mac': instance.mac,
      'bound': instance.bound,
    };
